<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('account')->comment('账号');
            $table->string('username')->comment('用户名');
            $table->string('password')->comment('密码');
            $table->string('google_secret')->nullable()->comment('谷歌验证密钥');
            $table->unsignedTinyInteger('status')->comment('状态：1 启用 2 禁用');
            $table->timestamps();
        });

        \Illuminate\Support\Facades\DB::statement("alter table `admins` comment '后台用户表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admins');
    }
}
